Remove unused implementation of vsprintf().
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 29 Jan 2007 21:16:02 +0000 (21:16 +0000)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 29 Jan 2007 21:16:02 +0000 (21:16 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/common/vsprintf.c
xen/include/xen/lib.h

index 3ed7b7052ab4a0bab11f35af0e364e2575f798f1..f4b788c403348dcc1e02f1e54ed7864879f5e8a0 100644 (file)
@@ -182,15 +182,6 @@ static char *number(
         tmp[i++]='0';
     else while (num != 0)
         tmp[i++] = digits[do_div(num,base)];
-#if 0
-    else 
-    {
-        /* XXX KAF: force unsigned mod and div. */
-        unsigned long long num2=(unsigned long long)num;
-        unsigned int base2=(unsigned int)base;
-        while (num2 != 0) { tmp[i++] = digits[num2%base2]; num2 /= base2; }
-    }
-#endif
     if (i > precision)
         precision = i;
     size -= precision;
@@ -570,26 +561,6 @@ int scnprintf(char * buf, size_t size, const char *fmt, ...)
 }
 EXPORT_SYMBOL(scnprintf);
 
-/**
- * vsprintf - Format a string and place it in a buffer
- * @buf: The buffer to place the result into
- * @fmt: The format string to use
- * @args: Arguments for the format string
- *
- * The function returns the number of characters written
- * into @buf. Use vsnprintf or vscnprintf in order to avoid
- * buffer overflows.
- *
- * Call this function if you are already dealing with a va_list.
- * You probably want sprintf instead.
- */
-int vsprintf(char *buf, const char *fmt, va_list args)
-{
-    return vsnprintf(buf, INT_MAX, fmt, args);
-}
-
-EXPORT_SYMBOL(vsprintf);
-
 /**
  * sprintf - Format a string and place it in a buffer
  * @buf: The buffer to place the result into
index 44ad7874cca8144a187f3dc4af7ba4c1900e12a5..5eca2b08c60d0a44594d5f9375561778a58bf014 100644 (file)
@@ -62,8 +62,7 @@ extern int printk_ratelimit(void);
 /* vsprintf.c */
 extern int sprintf(char * buf, const char * fmt, ...)
     __attribute__ ((format (printf, 2, 3)));
-extern int vsprintf(char *buf, const char *, va_list)
-    __attribute__ ((format (printf, 2, 0)));
+#define vsprintf __xen_has_no_vsprintf__
 extern int snprintf(char * buf, size_t size, const char * fmt, ...)
     __attribute__ ((format (printf, 3, 4)));
 extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)